package com.jasmine.bjstkserver.server.param;

import com.jasmine.bjstkserver.core.config.annotation.AuthIgnoreLimiter;
import com.jasmine.core.dto.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;


/**
 * 系统参数
 * @author jasmineXz
 */
@RestController
@RequestMapping("/param")
public class ParamController {

    @Autowired
    private ParamService paramService;

    /**
     * 查看字典
     */
    @GetMapping
    public R findOne(@RequestParam("paramId") Integer paramId) {
        return R.ok(paramService.findOne(paramId));
    }

    @AuthIgnoreLimiter
    @GetMapping("/clear/all")
    public R clearAll() {
        paramService.clearAll();
        return R.ok();
    }
}
